package com.lb.shopguide.adapter.viewpager;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by kang on 2017/9/7.
 */

public class AdapterMemberType extends FragmentPagerAdapter {
    private List<Fragment> listFragment;
    private List<String> titles;

    public AdapterMemberType(FragmentManager fm, List<Fragment> list, List<String> titles) {
        super(fm);
        this.listFragment = list;
        this.titles = titles;
    }

    @Override
    public Fragment getItem(int position) {
        return listFragment.get(position);
    }

    @Override
    public int getCount() {
        return listFragment.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles.get(position);
    }
}
